CC=gcc
CPP=g++
MAKE=make

all:	draw lz
	echo ":)"
	
debug: bit.o draw barre.o 
	$(MAKE) debug -C lz
	$(CC) -g -Wall main.c bit.o PS_draw.o barre.o lz/lz78.o lz/prefix-tree.o -o compress 

.c.o:
	$(CC) -g -c -Wall $< -o $@

.cpp.o:
	$(CPP) -c -Wall $< -o $@


testbit: bit.o
	$(CC) test.c bit.o -o testbit

huffman:
	$(MAKE) -C huffman
	
lz: bit.o
	$(MAKE) -C lz

draw:
	$(CC) -c -Wall PS_draw.c -o PS_draw.o
	
clean:
	rm PS_draw.o bit.o barre.o
	$(MAKE) clean -C lz
